make gpsbabel.html
make check
# test for mangled encoding of command line arguments
-./test_encoding
+./test_encoding_latin1
./test_encoding_utf8
#make torture
rm -f vg.log
+++ /dev/null
-#!/bin/bash
-# this file should be encoded in latin1
-
-BASEPATH=`dirname $0`
-PNAME=${PNAME:-${BASEPATH}/gpsbabel}
-REFERENCE=${BASEPATH}/reference
-
-TMPDIR=${GBTEMP:-/tmp}/gpsbabel.$$
-mkdir -p $TMPDIR
-trap "rm -fr $TMPDIR" 0 1 2 3 15
-
-errorcount=0
-
-if locale -a | grep -q en_US.iso88591 ; then
- export LC_ALL=en_US.iso88591
-
-# test input file name mangling
- rm -f ${TMPDIR}/test_encoding_file*
- cp ${REFERENCE}/bounds-test.gpx ${TMPDIR}/test_encoding_file¢.gpx
- ${PNAME} -i gpx -f ${TMPDIR}/test_encoding_file¢.gpx -o kml -F ${TMPDIR}/test_encoding_fileo.kml || {
- echo "ERROR: The input file name was mangled."
- errorcount=`expr $errorcount + 1`
- }
-
-# test output file name mangling
- rm -f ${TMPDIR}/test_encoding_file*
- ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o kml -F ${TMPDIR}/test_encoding_file¢.kml
- count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.kml | wc -l)
- if [ $count -lt 1 ]; then
- echo "ERROR: The output file name was mangled."
- errorcount=`expr $errorcount + 1`
- fi
-
-# test output file name mangling using a format that uses gbfile
- rm -f ${TMPDIR}/test_encoding_file*
- ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o unicsv -F ${TMPDIR}/test_encoding_file¢.csv
- count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.csv | wc -l)
- if [ $count -lt 1 ]; then
- echo "ERROR: The output file name was mangled."
- errorcount=`expr $errorcount + 1`
- fi
-
-# test input file name mangling using a format that uses gbfile with the gzapi
- rm -f ${TMPDIR}/test_encoding_file*
- cp ${REFERENCE}/sample.gtm.gz ${TMPDIR}/test_encoding_file¢.gtm.gz
- ${PNAME} -i gtm -f ${TMPDIR}/test_encoding_file¢.gtm.gz -o gpx -F ${TMPDIR}/test_encoding_fileo.gpx || {
- echo "ERROR: The input file name was mangled."
- errorcount=`expr $errorcount + 1`
- }
-
-else
- echo "$0 cannot run without the en_US.iso88591 locale."
-fi
-
-exit $errorcount
--- /dev/null
+#!/bin/bash
+# this file should be encoded in latin1
+
+BASEPATH=`dirname $0`
+PNAME=${PNAME:-${BASEPATH}/gpsbabel}
+REFERENCE=${BASEPATH}/reference
+
+TMPDIR=${GBTEMP:-/tmp}/gpsbabel.$$
+mkdir -p $TMPDIR
+trap "rm -fr $TMPDIR" 0 1 2 3 15
+
+errorcount=0
+
+if locale -a | grep -q en_US.iso88591 ; then
+ export LC_ALL=en_US.iso88591
+
+# test input file name mangling
+ rm -f ${TMPDIR}/test_encoding_file*
+ cp ${REFERENCE}/bounds-test.gpx ${TMPDIR}/test_encoding_file¢.gpx
+ ${PNAME} -i gpx -f ${TMPDIR}/test_encoding_file¢.gpx -o kml -F ${TMPDIR}/test_encoding_fileo.kml || {
+ echo "ERROR: The input file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ }
+
+# test output file name mangling
+ rm -f ${TMPDIR}/test_encoding_file*
+ ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o kml -F ${TMPDIR}/test_encoding_file¢.kml
+ count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.kml | wc -l)
+ if [ $count -lt 1 ]; then
+ echo "ERROR: The output file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ fi
+
+# test output file name mangling using a format that uses gbfile
+ rm -f ${TMPDIR}/test_encoding_file*
+ ${PNAME} -i gpx -f ${REFERENCE}/bounds-test.gpx -o unicsv -F ${TMPDIR}/test_encoding_file¢.csv
+ count=$(ls -1 -l ${TMPDIR}/test_encoding_file¢.csv | wc -l)
+ if [ $count -lt 1 ]; then
+ echo "ERROR: The output file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ fi
+
+# test input file name mangling using a format that uses gbfile with the gzapi
+ rm -f ${TMPDIR}/test_encoding_file*
+ cp ${REFERENCE}/sample.gtm.gz ${TMPDIR}/test_encoding_file¢.gtm.gz
+ ${PNAME} -i gtm -f ${TMPDIR}/test_encoding_file¢.gtm.gz -o gpx -F ${TMPDIR}/test_encoding_fileo.gpx || {
+ echo "ERROR: The input file name was mangled."
+ errorcount=`expr $errorcount + 1`
+ }
+
+else
+ echo "$0 cannot run without the en_US.iso88591 locale."
+fi
+
+exit $errorcount